package com.example.demo.service;

import com.example.demo.model.Book;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 功能描述：
 *
 * @Author: Zhanghf
 * @Date: 2021/12/15 9:15
 */
@Component
@FeignClient(value = "NOVEL-BOOK-SERVICE")
public interface BookFeignService {
    @GetMapping(value = "/gettext")
  public String gettext(@RequestParam("bookid")Integer bookid, @RequestParam("chapterid")  Integer chapterid );

    @GetMapping(value = "/gettitle")
    public String gettitle(@RequestParam("bookid")Integer bookid, @RequestParam("chapterid")  Integer chapterid );

    @PostMapping(value = "/getEmotionAnalysis")
    public String get(@RequestParam("content")String content, @RequestParam("rolename") String rolename );

    @PostMapping(value = "/gethighFrequencyForString")
    public String GethighFrequencyForString(@RequestParam("content")String content, @RequestParam("size") Integer size );
    @PostMapping("gethighFrequencyForNovel")
    public String GethighFrequencyForNovel(@RequestParam("bookid")Integer bookid, @RequestParam("startsize") Integer startsize, @RequestParam("offsize") Integer offsize, @RequestParam("size") Integer size) ;

    @GetMapping(value = "/getLeadingRole")
    public String getLeadingRole(@RequestParam("bookid")Integer bookid);

    @GetMapping("getlisttest")
    public List<Book> getlisttest(@RequestParam("bookid")Integer bookid) throws IOException ;

}
